/**
 * 
 */
package com.bestbuy.serviceimple;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.bestbuy.dao.AccountDao;
import com.bestbuy.dao.BillDAO;
import com.bestbuy.pojo.Bill;
import com.bestbuy.service.BillService;

/**
 * @author ThanhNgo
 *
 */
@Service
public class BillServiceImpl implements BillService {
	@Autowired
	private BillDAO billDAO;
	/* (non-Javadoc)
	 * @see com.bestbuy.service.BillService#getAllBill()
	 */
	@Transactional
	public List<Bill> getAllBill() {
		// TODO Auto-generated method stub
		return billDAO.getAllBill();
	}

	/* (non-Javadoc)
	 * @see com.bestbuy.service.BillService#getAllBill(java.lang.String)
	 */
	@Transactional
	public List<Bill> getAllBill(String page) {
		// TODO Auto-generated method stub
		return billDAO.getAllBill(page);
	}

	/* (non-Javadoc)
	 * @see com.bestbuy.service.BillService#getBillIsNotPaid(java.lang.String, java.lang.String)
	 */
	@Transactional
	public List<Bill> getBillIsNotPaid(String isPaid, String page) {
		// TODO Auto-generated method stub
		return billDAO.getBillIsNotPaid(isPaid, page);
	}

	/* (non-Javadoc)
	 * @see com.bestbuy.service.BillService#checkPaid(java.util.List)
	 */
	@Transactional
	public void checkPaid(List<Bill> listBill) {
		// TODO Auto-generated method stub

	}

	/* (non-Javadoc)
	 * @see com.bestbuy.service.BillService#countAllBill()
	 */
	@Transactional
	public int countAllBill() {
		// TODO Auto-generated method stub
		return billDAO.countAllBill();
	}

	/* (non-Javadoc)
	 * @see com.bestbuy.service.BillService#countAllBill(java.lang.String)
	 */
	@Transactional
	public int countAllBill(String isPaid) {
		// TODO Auto-generated method stub
		return billDAO.countAllBill(isPaid);
	}

	/* (non-Javadoc)
	 * @see com.bestbuy.service.BillService#updateBill(com.bestbuy.pojo.Bill)
	 */
	@Transactional
	public void updateBill(Bill bill) {
		// TODO Auto-generated method stub
		billDAO.updateBill(bill);
	}

	/* (non-Javadoc)
	 * @see com.bestbuy.service.BillService#getBill(java.lang.String)
	 */
	@Transactional
	public Bill getBill(String idBill) {
		// TODO Auto-generated method stub
		return billDAO.getBill(idBill);
	}

}
